package com.mapper.test.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author liuziyang
 * @create 2019-06-02 19:40
 *
 * 注意:开启缓存功能必须要求实体类实现序列化接口
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "table_emp")
public class Employee implements Serializable {
    private static final long serialVersionUID = -5000574646261065209L;
    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer empId;
    private String empName;
    @Column(name = "emp_salary")
    private Double empSalary;
    private Integer empAge;
}
